import objgraph
import schedule
from pympler import tracker, muppy, summary

tr = tracker.SummaryTracker()


def dosomething():
    print
    "memory total"
    all_objects = muppy.get_objects()
    sum1 = summary.summarize(all_objects)
    summary.print_(sum1)

    print("memory difference")
    tr.print_diff()
    # ........ 爬取任务
    pass


schedule.every(1).minutes.do(dosomething)